<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    $.each = (obj,callback) => {
        var value,
            i=0,
            length = obj.length,
            isArray = isArraylike(obj);
        if(isArray){
            for(;i<length;i++){
                value = callback.call(obj[i],i,obj[i]);
                if(value===false){
                    break;
                }
            }
        }else {
            for(i in obj){
                value = callback.call(obj[i],i,obj[i]);
                if(value===false){
                    break;
                }
            }
        }
        return obj;
    }
</script>
</body>
</html>